package com.zhz.mall.common.exception;

import com.zhz.mall.common.api.IErrorCode;
import lombok.Getter;

/**
 * 自定义异常
 *
 * @author zhouhengzhe
 */
@Getter
public class BusinessException extends RuntimeException {

    private IErrorCode errorCode;

    public BusinessException(String message) {
        super(message);
    }


    public BusinessException(IErrorCode errorCode) {
        super(errorCode.getMessage());
        this.errorCode = errorCode;
    }
}